from typing import *
from leetcode.editor.common.node import *


# leetcode submit region begin(Prohibit modification and deletion)
class Solution:
    def removeDuplicates(self, nums: List[int]) -> int:
        # 使用快慢指针
        slow,quick =0,0
        while quick < len(nums):
            if nums[quick] != nums[slow]:
                slow +=1
                nums[slow] = nums[quick]
            quick+=1
        return slow+1
        
# leetcode submit region end(Prohibit modification and deletion)


if __name__ == '__main__':
    solution = Solution()
    # your test code here